1. Field of the Invention
The present invention relates to a data processing apparatus which serves as an I/O unit connected to information processing apparatuses such as computers or the like, and is adapted to decode encrypted data and also to perform processings according to message data.
2. Description of the Related Art
Recently, data communication has come into great vogue. In order to prevent illegal use and falsification of messages, a technique has been adopted in which at the transmitting end messages are encrypted and then transmitted, and at the receiving end the encrypted messages are decoded. Another technique has been adopted in which at the transmitting end a signature is included with the messages, and at the receiving end, a signature confirmation processing is performed.
FIG. 1 is a typical illustration useful for understanding a process in which at the transmitting end messages are encrypted and at the receiving end the encrypted messages are decoded.
The transmitting end and the receiving end each have the same key a, as the key for encrypting and decoding messages. At the transmitting end, messages of plain text to be transmitted are locked with the key a, that is, messages are encrypted, so that the encrypted messages are produced and transmitted to the receiving end. Here, for the encryption, there is adopted, for example, a DES (Data Encryption Standard) algorithm or the like. At the receiving end, upon receipt of the encrypted messages, the same DES algorithm or the like is used to open a lock with the key a with respect to the encrypted messages, that is, to decode the messages to be restored. Thereafter, the messages are either interpreted, or processing according to the messages is executed.
FIG. 2 is a typical illustration useful for understanding a process in which at the transmitting end, a signature is included with the messages, and at the receiving end, a signature confirmation processing is performed.
The transmitting end and the receiving end each have a common key b for making up a signature from messages. At the transmitting end, a signature is made up from messages, and the signature is coupled with the messages, so that the messages with the signature, which are referred to as signed messages, are transmitted to the receiving end. In this case, in making up signatures, for the purpose of producing a signature code which is shorter in its length than the messages, there is adopted, usually, a CBC (Cipher Block Chaining) mode or the like. At the receiving end, upon receipt of the messages with signature, a message portion, except for the signature, is signed with the use of the key b, and the signature made in the receiving end is compared with the signature transmitted from the transmitting end. If there is a match therebetween, it is determined that falsification of the message has not occurred halfway through transmission of the message. Thereafter, the messages are either interpreted, or processing according to the messages is executed.
While the encryption processing (FIG. 1) of a message itself and the signature processing (FIG. 2) are separately explained, it has also been a practice that those are combined, so that the message itself is encrypted and also signed, and then transmitted.
Execution of the above-mentioned encryption/decoding processing and inclusion of the signature, along with confirmation processing, makes it possible to maintain safety of communications at a very high level.
By the way, even after receiving messages at the receiving end, the above-mentioned system has been associated with problems set forth below.
For example, it is assumed that the receiving end obtains, by making a contract with the transmitting end, aright to use a certain program and data a predetermined number of times (e.g. 10 times), and the transmitting end transmits over a communication channel the program and data, and additional programs to check a number of times in use of the program and data in accordance with the contract, and then the receiving end receives those items thus transmitted. At that time, the safety of the communication channel is ensured by execution of the above-mentioned encryption/decoding processing and inclusion of the signature, and confirmation processing. However, after those items are received on the receiving end, and decoding of the encrypted messages and the signature confirmation processing are implemented, if the number of times (e.g. 10 times) that the program and data are permitted to be used is falsified, for example, to 100 times, or the decoded program and data are illegally used or copied, those activities will make it possible inadvertently to use unreasonably the program and data outside of the bounds of the contract.
Further, in addition to the problems as to the safety after a reception of the message at the receiving end, there arises such a problem that generally a lot of time is required of a decoding processing for the encrypted messages received at the receiving end and for a signature confirmation processing to occur.
In view of the foregoing, it is considered that an I/O unit to be connected to a computer located at the receiving end is provided with a data buffer accessible from both the inside of the I/O unit and the computer so that the I/O unit implements either a decoding processing for the encrypted data or processing according to the messages.
Providing a data buffer, which is accessible from both the inside of an I/O unit and a computer, on the I/O unit makes it possible to perform in parallel an input of encrypted data from the computer and a decoding processing for the encrypted data in the I/O unit end. Thus, it is a possible to implement high speed data processing. In this case, however, there arises problems as to how timing of the transfer of data between the computer and the inside of the I/O unit is controlled, in other words, how to ensure with certainty that when data is read from a data buffer, the data intended to be read had been written into the data buffer.
An adoption of such an I/O unit has been associated with another problem as set forth below.
That is, a provision of a data buffer, which is accessible from both an I/O unit and a computer, may involve dangers such that, for example, at the stage that the encrypted program and data are decoded into plain text, before the program and data are saved at a safe location, the program and data may be unfairly copied, or for example, at the stage that a signature confirmation processing for messages with a signature is executed and it has been confirmed that the messages are not falsified, before the messages are saved at a safe location, the messages may be unfairly falsified. It is a problem how such dangers are prevented.
On the other hand, hitherto, there are known I/O units connected over channels to large scale computers and another type of I/O units connected via RS-232C, SCSI or the like to personal computers or the like. In case of those I/O units, there is so arranged that after data transmitted from the large scale computers or the personal computers are received in its entirety, processing is initiated, and after the processing is completed, the processed data are transferred to the computer end. Therefore, when it is considered that such an I/O unit serves to perform both the decoding processing and the message processing, there is no danger in which unfair copy and falsification in the middle of processing as mentioned above occur. However, in case of such an I/O unit, even in the event that encrypted data, which are not needed to consider a safety, are simply decoded, or in the event that one self becomes the transmitting end and requests the I/O unit to perform an encryption of messages, it will take a lot of time, as compared to the scheme in which the data transmission and processing are simultaneously performed.